import { createRouter, createWebHashHistory } from "vue-router";

const routes = [
  { path: "/", redirect: "/index" },
  {
    path: "/index",
    redirect: "/index/dashboard",
    component: () =>
      import(/* webpackChunkName: "order" */ "../views/index-view/index.vue"),
    children: [
      {
        path: "dice",
        name: "dice",
        component: () =>
          import(
            /* webpackChunkName: "order" */ "../views/dice-view/index.vue"
          ),
      },
      {
        path: "calendar",
        name: "calendar",
        component: () =>
          import(
            /* webpackChunkName: "order" */ "../views/calendar-view/index.vue"
          ),
      },
      {
        path: "dashboard",
        name: "dashboard",
        component: () =>
          import(
            /* webpackChunkName: "order" */ "../views/dashboard-view/index.vue"
          ),
      },
      {
        path: "memorandum",
        name: "memorandum",
        component: () =>
          import(
            /* webpackChunkName: "order" */ "../views/memorandum-view/index.vue"
          ),
      },
      {
        path: "reminders",
        name: "reminders",
        component: () =>
          import(
            /* webpackChunkName: "order" */ "../views/reminders-view/index.vue"
          ),
      },
      {
        path: "setting",
        name: "setting",
        component: () =>
          import(
            /* webpackChunkName: "order" */ "../views/setting-view/index.vue"
          ),
      },
    ],
  },
  {
    path: "/dice",
    component: () =>
      import(/* webpackChunkName: "order" */ "../views/dice-view/index.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
